package com.joysuch.wwyt.mh.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.joysuch.wwyt.mh.bean.MhMajorHazardTaskRecordItemSearchBean;
import com.joysuch.wwyt.mh.bean.MhMajorHazardTaskRecordSearchBean;
import com.joysuch.wwyt.mh.bean.vo.MhMajorHazardTaskRecordGetVO;
import com.joysuch.wwyt.mh.bean.vo.MhMajorHazardTaskRecordItemVO;
import com.joysuch.wwyt.mh.bean.vo.MhMajorHazardTaskRecordVO;
import com.joysuch.wwyt.mh.bo.MhMajorHazardTaskAssignBO;
import com.joysuch.wwyt.mh.dto.MhMajorHazardTaskRecordDTO;
import com.joysuch.wwyt.mh.entity.MhMajorHazardTask;
import com.joysuch.wwyt.mh.entity.MhMajorHazardTaskRecord;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zqw
 * @since 2022-05-24
 */
public interface MhMajorHazardTaskRecordService extends IService<MhMajorHazardTaskRecord> {

    //履职记录分页查询
    Page<MhMajorHazardTaskRecordVO> page(MhMajorHazardTaskRecordSearchBean mhMajorHazardTaskRecordSearchBean);

    //履职记录通过ID查看
    MhMajorHazardTaskRecordGetVO get(Long id);

    /**
     * 履职
     *
     * @param recordDto
     * @return
     */
    MhMajorHazardTaskRecord finishTask(MhMajorHazardTaskRecordDTO recordDto);

    //履职记录通过ID表单分页
    Page<MhMajorHazardTaskRecordItemVO> getItem(MhMajorHazardTaskRecordItemSearchBean mhMajorHazardTaskRecordItemSearchBean);

    //履职记录删除
    void deleteById(Long id);


    /**
     * 批量保存任务全未做逾期记录
     *
     * @param tasks
     * @param date
     * @return
     */
    List<MhMajorHazardTaskRecord> batchSaveAllOverdueRecords(List<MhMajorHazardTask> tasks, Date date);

    /**
     * 批量保存任务部分未做逾期记录
     * @param assignBoList
     * @return
     */
    void batchSavePartOverdueRecords(List<MhMajorHazardTaskAssignBO> assignBoList);
}
